﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyManager.Business
{
    public class CategoryCollection : List<Category>
    {
        public StringCollection GetCategoryIds()
        {
            StringCollection tempStrCollection = new StringCollection();
            tempStrCollection.AddRange(this.Select(x => x.Id).ToArray<string>());
            return tempStrCollection;
        }

        public StringCollection GetCategoryNames()
        {
            StringCollection tempStrCollection = new StringCollection();
            tempStrCollection.AddRange(this.Select(x => x.Name).ToArray<string>());
            return tempStrCollection;
        }

    }
}
